X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=blobdiff_plain;f=includes%2FSpecialGroups.php;h=a16ddaea66bab339b6c258cfe45d90fdea0f50df;hb=a26d5a49d755ff4b8039b11d1f26abb5d7bc7e8c;hp=6820bc4d3832d2c7962ea9a54a83ff1130eed557;hpb=1a96ca57a2a1699774d78d5cb07b3ad690c31422;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialGroups.php b/includes/SpecialGroups.php index 6820bc4d38..a16ddaea66 100644 --- a/includes/SpecialGroups.php +++ b/includes/SpecialGroups.php @@ -12,7 +12,7 @@ require_once('Group.php'); /** Entry point */ function wfSpecialGroups() { global $wgRequest; - + $form = new GroupsForm($wgRequest); $form->execute(); } @@ -26,14 +26,14 @@ class GroupsForm extends HTMLForm { var $mPosted, $mRequest, $mSaveprefs, $mChangeAllowed; var $mNewName, $mDescription, $mOldName, $mRights, $mId; var $mAdd, $mEdit; - + /** Escaped local url name*/ var $action, $location; /** Constructor*/ function GroupsForm ( &$request ) { global $wgUser; - + $this->mPosted = $request->wasPosted(); $this->mRequest =& $request; $this->mName = 'groups'; @@ -75,7 +75,7 @@ class GroupsForm extends HTMLForm { } elseif ( $this->mEdit ) { if ( $this->mPosted ) { $wgOut->redirect( $this->location ); - } else { + } else { $this->switchForm(); $this->editGroupForm( $this->mId ); } @@ -101,7 +101,7 @@ class GroupsForm extends HTMLForm { global $wgOut; $this->mNewName = trim($this->mNewName); - + if ( $this->mNewName == '' ) { $this->editGroupForm( $this->mGroupID, 'groups-noname' ); return false; @@ -127,16 +127,16 @@ class GroupsForm extends HTMLForm { return; } } - + // save stuff $g->setName($this->mNewName); $g->setDescription($this->mDescription); if( is_array( $this->mRights ) ) { $g->setRights( implode(',',$this->mRights) ); } - + $g->save(); - + // Make the log entry $log = new LogPage( 'rights' ); $dummyTitle = Title::makeTitle( 0, '' ); @@ -165,8 +165,8 @@ class GroupsForm extends HTMLForm { */ function switchForm() { global $wgOut; - - // group selection + + // group selection $wgOut->addHTML( "
action\" method=\"post\">\n" ); $wgOut->addHTML( $this->fieldset( 'lookup-group', HTMLSelectGroups('id', $this->mName.'-group-edit', array(0 => $this->mRequest->getVal('id')) ) . @@ -241,10 +241,10 @@ class GroupsForm extends HTMLForm { $s .= "|}\n"; $wgOut->addWikiText( $s ); } - + function showRecord() { global $wgOut; - + $groups =& Group::getAllGroups(); $rec = serialize( $groups ); // Split it into lines